package com.example.dubbo.core.controller.demo;

import com.example.common.vo.R;
import com.example.dubbo.aip.demo.BusinessService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 购物controller
 *
 * @author NiJo_H
 * @version 1.0
 */
@RestController
@RequestMapping("/shoping")
@Slf4j
public class ShopingController {
    @Reference(version = "1.0.0")
    private BusinessService businessService;


    @GetMapping("/creat")
    public R<String> creatShop() {
        return businessService.handleBusiness();
    }

    @GetMapping("/changeAccount")
    public R<Void> FechargeAccount(@RequestParam("cnt") Integer cnt) {
        return businessService.handleFechargeAccount(cnt);
    }
}
